const TransformPages = require("uni-read-pages");
const tfPages = new TransformPages({
	includes: ["path", "name", "meta", "aliasPath"],
});

/**
 * 全局注入一个ROUTES变量
 */
module.exports = {
	configureWebpack: {
		plugins: [
			new tfPages.webpack.DefinePlugin({
				ROUTES: JSON.stringify(tfPages.routes),
			}),
		],
	},
};
